﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PowerEdit.aspx.cs" Inherits="Myproject.Power.Power.PowerEdit" %>

<!DOCTYPE html>

<div class="bjui-pageHeader"></div>
<div class="bjui-pageContent">
    <form runat="server" action="/bsm/ashx/PcBase/FriendAjax.ashx?dos=edit" id="pc_base_FriendEdit_form" data-toggle="validate" data-alertmsg="false">
        <table class="table table-condensed table-hover" width="100%">
            <tbody>
                <tr>
                    <td>
                        <label class="control-label x50">权限组名称：</label>
                    </td>
                    <td>
                        <input type="text" runat="server" name="power_power_powerEdit_name" id="power_power_powerEdit_name" value="" size="20" placeholder="权限组名称" data-rule="权限组名称:required">
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <ul class="nav nav-tabs" role="tablist">
                            <li class="active"><a href="#power_power_powerEdit_tab1" role="tab" data-toggle="tab">后台权限</a></li>
                            <li><a href="#power_power_powerEdit_tab2" role="tab" data-toggle="tab">前台权限</a></li>
                            <li><a href="#power_power_powerEdit_tab3" role="tab" data-toggle="tab">平板权限</a></li>
                        </ul>
                        <!-- Tab panes -->
                        <div class="tab-content">
                            <div class="tab-pane fade active in" id="power_power_powerEdit_tab1">
                                <table class="table table-bordered table-hover table-striped table-top" data-toggle="tablefixed" data-height="500">
                                    <thead>
                                        <tr>
                                            <th style="text-align: center;" rowspan="2" colspan="3">权限名称</th>
                                            <th style="text-align: center;" colspan="4">操作权限</th>
                                        </tr>
                                        <tr>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="adds" data-toggle="icheck">新增</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="deletes" data-toggle="icheck">删除</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="selects" data-toggle="icheck">查看</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="updates" data-toggle="icheck">修改</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <%if (MessageTable != null && MessageTable.Rows.Count > 0)
                                          {
                                              System.Data.DataRow[] rows1 = MessageTable.Select(" pid='0' and  MenuTypeID='1' ", "MenuTypeID,HtmlRank");
                                              int i = 1;
                                              foreach (System.Data.DataRow row in rows1)
                                              {
                                                  string pid = row["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;">
                                                <%= row["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>

                                        <%
                                                   i++;
                                                   System.Data.DataRow[] rows2 = MessageTable.Select(" pid='" + pid + "' and  MenuTypeID='1'  ", "MenuTypeID,HtmlRank");


                                                   foreach (System.Data.DataRow row2 in rows2)
                                                   {
                                                       string pid2 = row2["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <%= row2["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>


                                        <%
                                                   i++;
                                                   System.Data.DataRow[] rows3 = MessageTable.Select(" pid='" + pid2 + "' and  MenuTypeID='1'  ", "MenuTypeID,HtmlRank");


                                                   foreach (System.Data.DataRow row3 in rows3)
                                                   {
                                                       string pid3 = row3["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <%= row3["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>
                                        <%
                                                   i++;
                                                   }
                                                   }
                                              }
                                          }%>
                                    </tbody>
                                </table>
                            </div>
                            <div class="tab-pane fade" id="power_power_powerEdit_tab2">
                                <table class="table table-bordered table-hover table-striped table-top" data-toggle="tablefixed" data-height="500">
                                    <thead>
                                        <tr>
                                            <th style="text-align: center;" rowspan="2" colspan="3">权限名称</th>
                                            <th style="text-align: center;" colspan="4">操作权限</th>
                                        </tr>
                                        <tr>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="adds" data-toggle="icheck">新增</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="deletes" data-toggle="icheck">删除</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="selects" data-toggle="icheck">查看</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="updates" data-toggle="icheck">修改</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <%if (MessageTable != null && MessageTable.Rows.Count > 0)
                                          {
                                              System.Data.DataRow[] rows1 = MessageTable.Select(" pid='0' and  MenuTypeID='2' ", "MenuTypeID,HtmlRank");
                                              int i = 1;
                                              foreach (System.Data.DataRow row in rows1)
                                              {
                                                  string pid = row["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;">
                                                <%= row["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>

                                        <%
                                                   i++;
                                                   System.Data.DataRow[] rows2 = MessageTable.Select(" pid='" + pid + "' and  MenuTypeID='2'  ", "MenuTypeID,HtmlRank");


                                                   foreach (System.Data.DataRow row2 in rows2)
                                                   {
                                                       string pid2 = row2["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <%= row2["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>


                                        <%
                                                   i++;
                                                   System.Data.DataRow[] rows3 = MessageTable.Select(" pid='" + pid2 + "' and  MenuTypeID='2'  ", "MenuTypeID,HtmlRank");



                                                   foreach (System.Data.DataRow row3 in rows3)
                                                   {
                                                       string pid3 = row3["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <%= row3["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>
                                        <%
                                                   i++;
                                                   }
                                                   }
                                              }
                                          }%>
                                    </tbody>
                                </table>
                            </div>
                            <div class="tab-pane fade" id="power_power_powerEdit_tab3">
                                <table class="table table-bordered table-hover table-striped table-top" data-toggle="tablefixed" data-height="500">
                                    <thead>
                                        <tr>
                                            <th style="text-align: center;" rowspan="2" colspan="3">权限名称</th>
                                            <th style="text-align: center;" colspan="4">操作权限</th>
                                        </tr>
                                        <tr>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="adds" data-toggle="icheck">新增</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="deletes" data-toggle="icheck">删除</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="selects" data-toggle="icheck">查看</th>
                                            <th style="text-align: center;">
                                                <input type="checkbox" class="checkboxCtrl" data-group="updates" data-toggle="icheck">修改</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                            <td>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="0"></td>
                                            <td>
                                                <input type="checkbox" name="deletes" data-toggle="icheck" checked value="0"></td>
                                            <td>
                                                <input type="checkbox" name="selects" data-toggle="icheck" checked value="0"></td>
                                            <td>
                                                <input type="checkbox" name="updates" data-toggle="icheck" checked value="0"></td>
                                        </tr>
                                        <%if (MessageTable != null && MessageTable.Rows.Count > 0)
                                          {
                                              System.Data.DataRow[] rows1 = MessageTable.Select(" pid='0' and  MenuTypeID='3' ", "MenuTypeID,HtmlRank");
                                              int i = 1;
                                              foreach (System.Data.DataRow row in rows1)
                                              {
                                                  string pid = row["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;">
                                                <%= row["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                             <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>

                                        <%
                                                  i++;
                                                  System.Data.DataRow[] rows2 = MessageTable.Select(" pid='" + pid + "' and  MenuTypeID='3'  ", "MenuTypeID,HtmlRank");


                                                  foreach (System.Data.DataRow row2 in rows2)
                                                  {
                                                      string pid2 = row2["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <%= row2["MenuName"] %>
                                            </td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row2["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row2["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row2["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row2["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>


                                        <%
                                                      i++;
                                                      System.Data.DataRow[] rows3 = MessageTable.Select(" pid='" + pid2 + "' and  MenuTypeID='3'  ", "MenuTypeID,HtmlRank");



                                                      foreach (System.Data.DataRow row3 in rows3)
                                                      {
                                                          string pid3 = row3["MenuID"].ToString();
                                        %><tr>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;"></td>
                                            <td style="text-align: center;">
                                                <%= row3["MenuName"] %>
                                            </td>
                                           <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerAdd"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerAdd"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerAdd"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerAdd"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerDelete"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerDelete"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerDelete"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerDelete"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerSelect"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerSelect"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerSelect"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerSelect"] %>">
                                                <% }%>
                                            </td>
                                            <td style="text-align: center;">
                                                <% if (bool.Parse(row3["PowerUpdate"].ToString()) || string.IsNullOrWhiteSpace(row3["PowerUpdate"].ToString()))
                                                   { 
                                                %>
                                                <input type="checkbox" name="adds" data-toggle="icheck" checked value="<%= row3["PowerUpdate"] %>">
                                                <%
                                                   }
                                                   else
                                                   {%>
                                                <input type="checkbox" name="adds" data-toggle="icheck" value="<%= row3["PowerUpdate"] %>">
                                                <% }%>
                                            </td>
                                        </tr>
                                        <%
                                                          i++;
                                                      }
                                                  }
                                              }
                                          }%>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>

    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">取消</button></li>
        <li>
            <button type="submit" class="btn-green" data-icon="save">提交</button></li>
    </ul>
</div>
